﻿#region  文件信息

// ---------------------------------------------------------------------------------------
// <copyright file="AliPayConfig.cs" company="">
// 作者：李帅伦
// </copyright>
// <summary>
// 类型简介：
// 类型详细：AliPayConfig.cs
// 创建时间：2014-12-25 15:13
// 修改时间：2014-12-25 15:10
// </summary>
// ---------------------------------------------------------------------------------------
#endregion

namespace Payment.Albaba.Com
{
    #region

    using System.Collections.Generic;

    #endregion

    /// <summary>
    ///     基本参数
    /// </summary>
    public class AliConfig : Dictionary<string, string>
    {
        public string Key { get; set; }

        public string SellerEmail { get; set; }

        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="AliPayConfig"/> class.  
        /// 构造一个基本参数 <see cref="AliPayConfig"/> class.
        /// </summary>
        /// <param name="partner">
        /// 合作者身份 ID .
        /// </param>
        /// <param name="key">Key</param>
        public AliConfig(string partner, string key)
        {
            this.Key = key;
            this.Partner = partner;
            this.Service = "create_direct_pay_by_user";
            this.SignType = "MD5";
            this.InputCharset = "utf-8";
            this.ErrorNotifyUrl = "";
        }


        #endregion

        #region Public Properties

        /// <summary>
        ///     接口名称
        /// </summary>
        public string Service
        {
            get
            {
                return this["service"];
            }
            private
            set
            {
                this["service"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the _input_charset.
        /// </summary>
        public string InputCharset
        {
            get
            {
                return this["_input_charset"];
            }
            private
            set
            {
                this["_input_charset"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the notify_url.
        /// </summary>
        public string NotifyUrl
        {
            get
            {
                return this["notify_url"];
            }

            set
            {
                this["notify_url"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the partner.
        /// </summary>
        public string Partner
        {
            get
            {
                return this["partner"];
            }
            private
            set
            {
                this["partner"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the return_url.
        /// </summary>
        public string ReturnUrl
        {
            get
            {
                return this["return_url"];
            }

            set
            {
                this["return_url"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the sign.
        /// </summary>
        public string Sign
        {
            get
            {
                return this["sign"];
            }
            private
            set
            {
                this["sign"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the sign_type.
        /// </summary>
        public string SignType
        {
            get
            {
                return this["sign_type"];
            }
            private
            set
            {
                this["sign_type"] = value;
            }
        }

        /// <summary>
        /// Gets or sets the sign_type.
        /// </summary>
        public string ErrorNotifyUrl
        {
            get
            {
                return this["error_notify_url"];
            }
            private
            set
            {
                this["error_notify_url"] = value;
            }
        }


        #endregion
    }
}